<template>
    <div>
        <a-steps direction="vertical" :current="checkHistorys.length">
            <a-step v-for="his in checkHistorys" :title="his.nodeName">
                <span slot="description">
                    <p><rx-user-info :userId="his.handlerId"/>{{his.createTime}}进行了<b> {{his.jumpTypeName}}</b> 操作</p>
                    <p>{{his.remark}}</p>
                </span>
            </a-step>      
        </a-steps>
    </div>
</template>
<script>

import BpmCheckHistoryApi from "@/api/bpm/core/bpmCheckHistory";
import {RxUserInfo} from '@lowcode/jpaas-common-lib';

export default {
    name:'BpmCheckHistories',
    props:{
        instId:String,
        require:true
    },
    components:{
        RxUserInfo
    },
    data(){
        return {
            checkHistorys:[]
        }
    },
    created(){
        this.loadCheckHistoires();
    },
    methods:{
        loadCheckHistoires(){
            let self=this;
            BpmCheckHistoryApi.getCheckHistorys(this.instId).then(his=>{
            self.checkHistorys = his;
          });
        }
    }
}
</script>